﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using TdxConnector;

namespace FinScreen.Connectors
{
    class TdxClient : ClientBase<ITdxService>, ITdxService
    {
        public TdxClient()
        {

        }
        public TdxClient(string endpointConfigurationName)
            : base(endpointConfigurationName)
        {
        }

        public int SendOrder(int category, string zqdm, double price, int quantity)
        {
            return Channel.SendOrder(category, zqdm, price, quantity);
        }

        public bool CancelOrder(int nth)
        {
            return Channel.CancelOrder(nth);
        }


        public Asset GetAsset()
        {
            return Channel.GetAsset();
        }

        public Position[] GetPositions()
        {
            return Channel.GetPositions();
        }

        public Order[] GetOrders(bool excludeCancelled = true)
        {
            return Channel.GetOrders(excludeCancelled);
        }
    }
}
